package com.example.demo.controller;

import com.example.demo.entity.Book;
import com.example.demo.entity.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RestController
@RequestMapping("/book")
public class BookController {
    @RequestMapping("/findall")
    public Result<Book> findByName(){
       Book book = new Book("java 编程思想","清华大学出版社");
        Result<Book> ret = new Result<Book>();
        ret.setData(book);
        ret.setCode(200);
        ret.setMsg("查找成功");
        return ret;
    }
}
